package com.note.app.config;

import org.dromara.easyes.common.property.GlobalConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import org.dromara.easyes.core.kernel.BaseEsMapper;


@Configuration
public class EasyEsConfig {
    // EasyES的配置，确保能正确扫描到Mapper
    @Bean
    public GlobalConfig globalConfig() {
        GlobalConfig globalConfig = new GlobalConfig();
        // 设置打印DSL语句，方便调试
        globalConfig.setPrintDsl(true);
        // 设置分布式环境
        globalConfig.setDistributed(false);
        // 设置异步处理索引阻塞
        globalConfig.setAsyncProcessIndexBlocking(true);
        return globalConfig;
    }
}